/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bank.entries;

import frmwrk.core.Entry;
import frmwrk.interfaces.IAccount;
import java.util.GregorianCalendar;

/**
 *
 * @author Ant Ongun Kefeli
 */
public class AddInterest extends Entry {

    public AddInterest(Double amount, GregorianCalendar date, IAccount account) {
        super(amount, date, account);
    }

    public AddInterest(Double amount, GregorianCalendar date) {
        super(amount, date, null);
    }
    
    @Override
    public boolean execute() {
        account.setBalance(account.getBalance() + account.getBalance()*amount/100.0 );
        return true;
    }
    
}
